package com.lzw.DailyAudit.mapper;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.hooya.fa.eu.biz.DailyAudit.entity.TempKcjlDailyHy;
import com.hooya.fa.eu.biz.DailyAudit.entity.dto.TempKcjlDailyHyDTO;
import com.hooya.fa.eu.biz.DailyAudit.entity.dto.kcjlDataDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-09-15
 */
@Mapper
public interface DailyTempKcjlDailyHyMapper {

	@DS("fa_eu_daily")
    @Select("SELECT cpbh, place, sl, belongs, hy as hthm, htrq FROM temp_kcjl_daily_hy WHERE date = #{date}")
	List<TempKcjlDailyHyDTO> getHyData(@Param("date") String date);

	@DS("fa_eu_daily")
    void batchInsert(@Param("data") List<TempKcjlDailyHy> data);

	@DS("fa_eu_daily")
//	@DS("fa_eu")
    List<kcjlDataDTO> getDataByEnddate(@Param("end")String end);

	@DS("fa_eu_daily")
	@Delete("delete from fa_eu_daily.temp_kcjl_daily_hy where date = #{currentDate} ")
    void deleteCurData(@Param("currentDate") String currentDate);


}
